
<div id="tabs">
	<ul>
        <li  id="current"><?php echo $this->Html->link(__('Các bài viết', true), array('action' => 'index',$idnoidung)); ?> </li>
        <li><?php echo $this->Html->link(__('Viết phản hồi', true), array('action' => 'add',$idnoidung)); ?></li>
        <li><?php echo $this->Html->link(__('Trở về diễn đàn', true), array('controller'=>'z2forums','action' => 'index')); ?></li>
	
	</ul>
</div>
<div class="phanhoips index">
	<h2 align="center"><?php __($nd ['Noidung'] ['tieude']);?></h2>
    <h4><?php __($nd ['Noidung'] ['noidung']);?></h4>
    
    <p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% bài viết phản hồi', true)
	));
	?>	</p>
	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>

	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo $this->Paginator->sort('STT','id');?></th>
			<th><?php echo $this->Paginator->sort('Bài viết');?></th>
			<th class="actions"><?php __('Hành động');?></th>
	</tr>
    <tr>
    <td colspan="3" align="center">
  <strong>  <?php echo $nd ['Noidung'] ['noidung'];?>
   </strong> </td>
    </tr>
	<?php
	$i = 0;
	foreach ($phanhoips as $phanhoip):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
   
	<tr<?php echo $class;?>>
    <td><?php echo $phanhoip['Nhanvien']['name']. ', đã viết lúc '.date('d-m-Y H:m',strtotime($phanhoip['Phanhoip']['ngaytao']));?></td>
	<td><?php echo $phanhoip['Phanhoip']['noidung']; ?>&nbsp;</td>
	<td class="actions">
			<?php 
          //  if($phanhoip['Phanhoip']['nhanvien_id']==$idnhanvien)   
        //        echo $this->Html->link(__('Edit', true), array('action' => 'edit', $phanhoip['Phanhoip']['id'])); ?>
			<?php 
            // if($quyen=='admin')
       if($phanhoip['Phanhoip']['nhanvien_id']==$idnhanvien)   
        
                echo $this->Html->link(__('Delete', true), array('action' => 'delete', $phanhoip['Phanhoip']['id'],$idnoidung), null, sprintf(__('Are you sure you want to delete # %s?', true), $phanhoip['Phanhoip']['id'])); ?>
	</td>
	</tr>
<?php endforeach; ?>
	</table>
	
</div>